from openai import OpenAI
from dotenv import load_dotenv
import os

load_dotenv()

client = OpenAI(
	base_url="https://ai.gitee.com/v1",
	api_key=os.getenv("api_key"),
)

response = client.moderations.create(
	input=[
		{
			"type": "image_url",
			"image_url": {
                # 需替换为实际要审核的图片 URL
				"url": "https://example.com/image.jpg"
			}
		}
	],
	model="nsfw-classifier",
)
print("Risk Control Detection Results:")
print(response)